const Tenvi = {
  /** 资源列表 */
  res: {
    bd: ['00001', '00002', '00003'],
    hd: {
      andras: ['00004', '00176', '00177'],
      silva: ['00180', '00181', '00006'],
      talli: ['00178', '00005', '00179']
    },
    cp: [
      '00464',
      '00033', '00038', '00039', '00040', '00041',
      '00050', '00059', '00063', '00064', '00073',
      '00074', '00075', '00076', '00083', '00084',
      '00088', '00091', '00096', '00100', '00104',
      '00107', '00108', '00109', '00122', '00130',
      '00135', '00147', '00165', '00171', '00198',
      '00199', '00200', '00201', '00202', '00209',
      '00212', '00228', '00239', '00240', '00241',
      '00257', '00258', '00259', '00260', '00265',
      '00270', '00275', '00276', '00277', '00278',
      '00279', '00280', '00281', '00282', '00283',
      '00284', '00285', '00286', '00287', '00288',
      '00289', '00305', '00306', '00307', '00308',
      '00313', '00318', '00323', '00324', '00325',
      '00326', '00327', '00328', '00329', '00330',
      '00331', '00332', '00333', '00334', '00335',
      '00336', '00337', '00353', '00354', '00355',
      '00356', '00361', '00366', '00371', '00372',
      '00373', '00374', '00375', '00376', '00377',
      '00378', '00379', '00380', '00381', '00382',
      '00383',
      '00389', '00417', '00421', '00425', '00426',
      '00427', '00444', '00445', '00446', '00447',
      '00448', '00502', '00503', '00504', '00705',
      '00981', '00985', '00986', '00987', '01000',
      '01001', '01002', '01048', '01049', '01050',
      '01102', '01103', '01104', '01150', '01151',
      '01152', '01618', '01619', '01620', '01621',
      '01622', '01652', '01655', '01661', '01662',
      '01663', '01664', '01669', '01678', '01679',
      '01680', '01681', '01687', '01688', '01689',
      '01690', '01691', '01692', '01693', '01694',
      '01695', '01696', '01697', '01698', '01699',
      '01700', '01701', '01710', '01711', '01712',
      '01713', '01714', '01715', '01716', '01717',
      '01718', '01719', '01720', '01721', '01722',
      '01723', '01724', '01725', '01726', '01727',
      '01728', '01729', '01730', '01731', '01732',
      '01733', '01734', '01735', '01771', '01772',
      '01782', '01783', '01784', '01785', '01786',
      '01787', '01788', '01789', '01790', '01791',
      '01792', '01796', '01804', '01811', '01812',
      '01813', '01814', '01816', '01828', '01829',
      '01830', '01831', '01836', '01850', '01851',
      '01852', '01853', '01854', '01865', '01872',
      '01873', '01874', '01875', '01876', '01882',
      '01884', '01885', '01886', '01887', '01888',
      '01906', '01907', '01908', '01909', '01910',
      '01911', '01912', '01913', '01919', '01920',
      '01921', '01922', '01923', '01924', '01925',
      '01926', '01927', '01928', '01929', '01932',
      '01933', '01934', '01935', '01936', '01958',
      '01967', '01997', '02088', '02439', '02440',
      '02441', '02442', '02449', '02450', '02451',
      '02452', '02464', '02465', '02466', '02488',
      '02489', '02490', '02491', '02492', '02493',
      '02502', '02503', '02504', '02505', '02506',
      '02507', '02519', '02547', '02548', '02549',
      '02550', '02552', '02553', '02557', '02604',
      '02649',
      // 精灵独占
      //'00385', '00386',

      // 龙人独占
      //'00387', '00388',

      // 军曹
      //'02579', '02581', '02588', '02591', '02594',
    ],
    hr: [
      '00015', '00016', '00017', '00018', '00019',
      '00020', '00021', '00022', /*'00032',*/ '00036',
      '00037', '00057', '00061', '00082', '00086',
      '00087', '00092', '00097', '00113', '00117',
      '00120', '00124', '00127', '00132', '00137',
      /*'00141',*/ '00143', '00144', '00148', '00149',
      '00151', '00154', '00163', '00164', '00170',
      '00174', '01775', '01776', '01794', '01795',
      '01815', '01817', '01818', '01832', '01833',
      '01834', '01835', '01864', '01878', '01883',
      '01889', '01978', '01979', '02469', '02470',
      '02471', /*'02577'*/
      '00000'
    ],
    fc: [
      '00007', '00013', '00014', '00028', '00029',
      '00030', '00035', '00044', '00116', '00119',
      '00123', '00133', '00139', '00142', '01880',
      '|',
      '00011', '00012', '00023', '00024', '00025', 
      '00026', '00027', '00031', '00045', '00112', 
      '00126', '00136', '00150', '00169', '00175', 
      '01881'
    ],
    fa: [
      '00000', '00056', '01877', '01879', '02648', // 创可贴，海盗眼罩，匹诺曹鼻子，驯鹿鼻子
      '00051', '00055', '00128', '02647', '00140', // 眼镜
      '01702', '01703', '01704', '01705', '01706', // 大鼻子眼镜
      '01868', '01867', '01870', '01869', '01871', // 百叶窗眼镜
      '01740', '01741', '01742', '01743', '01707', // 半遮面具
      '01738', '01736', '01737', '01708', '01739', // 潜水目镜
      '01914', '01915', '01916', '01917', '01918', // 奶嘴
      '01709', '00111', // 胡子，耳麦
      '02467', '02468', '02496', '02497', '02498', '02499', '02500', '02501', // 耳环
      /* '02583', '02584', '02590', '02593', '02596' */ // 军曹面罩，无需选择
    ],
    cl: [
      // 人类
      '00481', '00472', '00473', '00474', '00484',
      '00529', '00511', '00547', '00532', '00550', '00548', '00549',
      '00577', '00559', '00449', '00625', '00607', '00643', '00628', '00646', '00644', '00645',
      /*'00595', '00598', '00580', '00596', '00597', */ // 与图标不符且重复
      '00121', '01204', '01354', '00102', '00103', '00134', '00129', '00118', // 军服
      // 精灵
      '00482', '00475', '00476', '00477', '00489',
      '00530', '00512', '00553', '00537', '00554', '00551', '00552',
      '00578', '00560', '00450', '00601', '00585', '00602', '00599', '00600',
      '00626', '00608', '00649', '00633', '00650', '00647', '00648',
      '01205', '00657', '00658',
      // 龙人
      '00483', '00478', '00479', '00480', '00494',
      '00531', '00513', '00555', '00542', '00556', '00557', '00558',
      '00579', '00561', '00451', '00452', '00604', '00603', '00605', '00606', '00590',
      '00627', '00609', '00651', '00652', '00653', '00654', '00638',
      '01806', '01808', '01807', '01308', '01809', '01810', // 念珠袍子 * 6
      '01356',
      // 战斗服
      '00106', '00080', '01355', '01307', '01253',
      '02408', '00115', '00655', '01306', '01252',
      '00114', '00034', '01254', '00659', '00660',
      // 可爱
      '00093', '01797', '01805', '02612', '02410', // 熊，黑猫，黄狗，种子宝宝，羊宝宝
      // 情侣款
      '00666', '02494', '00081', '01965', '01960', // 内衣，校服，侍者，圣诞，游乐园工作服
      '00665', '02495', '00173', '01966', '01959',
      '00060', '00046', '00048', '00162', '00167', // 爱心，橙灰条纹，白色V领，白毛衣，白衬衫
      '00062', '00043', '00047', '00161', '00168',
      '00125', '00065', '00053', '01998', '00390', // 工装裤，黑白袍，彩色袍子，医护人员
      '00042', '00066', '00054', '00138', '00153',
      '01674', '01677', '01675', '01656', '01676', // 水手服 * 5
      '01670', '01673', '01671', '01653', '01672',
      '01646', '01650', '01651', '01648', '01649', // 斜挎包 * 5
      '01665', '01667', '01647', '01666', '01668',
      '01615', '01616', '01617', '00999', '00995', // 婚纱
      '00990', '00996', '00997', '00998', '00049', // 西服
      // 夏日海滩
      '01683', '01684', '01685', '01682', '01686', // 条纹裙子
      '01657', '01658', '01659', '01654', '01660', // 条纹背心+牛仔短裤+凉鞋
      '02570', '02568', '02571', '02572', '02569', // 比基尼 * 5
      '01770', '01777', '01781', '01774', '00052', // 粉色比基尼，草莓，海魂，海滨花环-女
      '02576', '02574', '02575', '01773', '01793', // 泳裤*3，海滨花环-男
      // 便服
      '01899', '01837', '01900', '01901', '01898', // 围巾+棉袄+裙子 * 5
      '01902', '01903', '01863', '01904', '01905', // 格子方巾+长裤 * 5  
      '01825', '01827', '01826', '01824', '00506', // 街头嘻哈+金链子 * 5
      '01890', '01893', '01862', '01892', '01891', // 阿三风格 * 5
      '01897', '01894', '01895', '01866', '01896', // 短风衣+腰带
      '01821', '01823', '01822', '01820', '00505', // 点点+背后蝴蝶结（未实装） * 5
      '00058', '00072', '00071', '00067', '00069', // 小点点裙+胸前蝴蝶结 * 3，妖精裙+透明翅膀（未实装）
      '00078', '00079', '00194', '00068', '00070', // 蝴蝶结+长裤 * 3，妖精裤+透明翅膀（未实装）
      '00983', '00982', '00984', '00236', '00166', // 五角星上衣+长裤 * 3
      '00195', '00196', '00197', '00089', '00105', // 单肩带+十字架 * 3
      '00988', '00989', '00077', '00145', '00095', // 点点无袖裙子
      // 其他
      '00131', '00090', // 女装
      '00146', '00085', '02578', '00172', '00152', '01819', '02409', // 男装
      '01930', '00419', '02411', '01206', '02646', // 万圣节，兽皮，柯南
      // 军曹套装
      /* '02580', '02582', '02589', '02592', '02595'*/
    ],
    wp: [
      '00744', '00747', '00756',
      '00759', '00768', '00771', '00780', '00783',
      '00792', '00795', '00804', '00807', '00816',
      '00819', '01855', '01856', '00098', '00101', 
      '02443', '02444', '02453', '02454', '02520', '02524', '02528', 
      '|',
      '00746', '00753', '00758', '00765',
      '00770', '00777', '00782', '00789', '00794',
      '00801', '00806', '00813', '00818', '00825',
      '00099', '01859', '01860', '01861', '02447', '02448',
      '02457', '02458', '02523', '02527', '02530', 
      '|',
      '00745', '00750', '00757', '00762', '00769',
      '00774', '00781', '00786', '00793', '00798',
      '00805', '00810', '00817', '00822', '01857',
      '01858', '02445', '02446', '02455', '02456',
      '02521', '02522', '02525', '02526', '02529',
      '|',
      '02539', '02541', '02542', '02543', '02544', '02545', '02546',
      '02540', '02643', 
      '|',
      '00110', '01931', '02554',
    ],
    emo: [],
    dfA: [
      '00008', '00159', '00160', '00182', '00183', '00184', '00185',
    ],
    doA: [ '', 
      '20003', '20000', '20309', '20310', '20018', '20019', '20020', '20021', '20030', // 透明挡板
      '|', '20072', '20075', '20093', '20094', '20095', '20096', '20105', '51032', // 扶手
      '|', '20147', '20150', '20168', '20169', '20170', '20171', '20180', '20195', '20196', '51006', // 透明罩
      '|', '20228', '20231', '20249', '20250', '20251', '20252', '20261', '20276', '20277', // 阀门
      '|', '20340', '20445', '20446', // 双阀门
      '|', '20481', '24071', '24072', '20415', // 高级
      '|', '24041', '24243', '24244', '24369', '24370', // V字盔
      '|', '24458', '24459', '24460', '24461', '24462', // 面甲
      '|', '24463', '24464', '24465', // PVP荣誉面甲
      '|', '24113', '25088', '25582', '24105', // 怪异
      '|', '20334', '24146', '25436', '20336', '24143', '24133', '24134', // 动物系
      '|', '24116', '24117', '24118', '24119', // 街头嘻哈
      '|', '24943', '24944', '24945', '24946', '24947', // 万圣节
      '|', '24990', '24994', '24995', '24996', '24997', // 雪人
      '|', '24412', '25450', '24422', '24423', '24424', '24425', '25855', '24451', // 套装
    ],
    amA: [ '', 
      '20500', '20503', '20809', '20810', '20518', '20519', '20520', '20521', '20530', // 朴素
      '20572', '20575', '20593', '20594', '20595', '20596', '20605', '51033', // 箍
      '20647', '20650', '20668', '20669', '20670', '20671', '20680', '20722', '20723', '20355', '20358', // 饭团
      '20728', '20731', '20749', '20750', '20751', '20752', '20761',/* '20788',*/ '20803', '20804', '51007', // 青蛙
      '20921', '20861', '20978', '20979', '24547', '20987', '24604', '24605', // 高级
      '24770', '24771', '24896', '24897', '25583',
      '24614', '24617', '24621', '20841', '24628', '24629', '24639', '24640', '24641', '24916', '24919', '24920', '24921', '24922', '24993', '25089', '25438', // 时装
      '20833', '24907', '24908', '24909', '24910', '25448', '25852', '24452', // 套装
    ],
    dcA: [ '', 
      '21018', '21000', '21021', '21036', '21037', '21038', '21039', '20356', '20359', '51030', // 基础1
      '21075', '21093', '21096', '21111', '21112', '21113', '21114', '21123', '21124', '51008', // 基础2
      '21156', '21174', '21177', '21192', '21193', '21194', '21195', '21204', '21205', // 基础3
      '21258', '21318', '21351', '21352', '21384', '21477', '21478', '21444', '25193', '25194', '25319', '25320', //
      '25020', '25029', '25030', '25062', '25065', '25066', '25067', '25068', '25091', '25471', '25472', 
      '25026', '25027', '25028', '25433',  // 动物系
      '21250', '25014', '25019', '25021', '25024',  // 时装
      '25048', '25054', '25055', '25056', '25057', '25451', '25856', '24453', // 套装
    ],
    lpA: [ '', 
      '21518', '21500', '21521', '21536', '21537', '21538', '21539', '20357', '20360', '51031', // 基础1
      '21575', '21593', '21596', '21611', '21612', '21613', '21614', '21623', '21624', '51009', // 基础2
      '21656', '21674', '21677', '21692', '21693', '21694', '21695', '21704', '21705', // 基础3
      '21768', '21828', '21861', '21862', '21894', '21987', '21988', 
      '21954', '25693', '25694', '25819', '25820', 
      '25564', '25567', '25568', '25569', '25570',
      '25528', '25538', '25539', '21737', '25090',
      '25439', '25540', // 动物系
      '21754', '25477', '25524', '25531', '25532', '25534',  // 时装
      '25550', '25556', '25557', '25558', '25559', '25447', '25853', '24454', // 套装
    ],
    ppA: [ '', 
      '22000', '22003', '22004', '22005', '22006', '22015', // 单筒
      '22072', '22075', '22045', '22046', '22047', '22048', '22057', '22105', '22106', // 双桶
      '22153', '22156', '22126', '22127', '22128', '22129', '22138', '22186', '22187', // 基础方块
      '22224', '22314', '22315', '22350', '22440', '22441', 
      '22410', '27120', '27121', '27246', '27247', 
      '22284', '24984', '25092',
      '27252', '27255', '27256', '27257', '27258',
      '22193', '22456', '22473', '22474', '22475', '22450', '25486', // 时装
      '22477', '22483', '22484', '22485', '25449', '22486', '25854', // 套装
       
    ],
    rhA: [
      '00000', 
      '22500', '22501', '22502', '22503', '22510', '22515', '22520', '22525', '22550', '22551', '22552', '22553', '22558', '22559', '22560', '22561', '22562', '22563', '22564', '22565', '22566', '22567', '22568', '22569', '22570', '22571', '22572', '22573', '22574', '22575', '22576', '22577', '22578', '22579', '22580', '22581', '22582', '22583', '22584', '22585', '22607', '22608', '22609', '22610', '22615', '22620', '22625', '22630', '22655', '22656', '22657', '22658', '22663', '22664', '22665', '22666', '22667', '22668', '22669', '22670', '22671', '22672', '22673', '22674', '22675', '22676', '22677', '22678', '22679', '22680', '22681', '22682', '22683', '22684', '22685', '22686', '22687', '22688', '22689', '22690', '22719', '22720', '22721', '22722', '22727', '22728', '22729', '22730', '22735', '22740', '22745', '22750', '22775', '22776', '22777', '22778', '22783', '22784', '22785', '22786', '22787', '22788', '22789', '22790', '22791', '22792', '22793', '22794', '22795', '22796', '22797', '22798', '22799', '22800', '22801', '22802', '22803', '22804', '22805', '22806', '22807', '22808', '22809', '22810', '22839', '22840', '22841', '22844', '22849', '22850', '22851', '22852', '22857', '22862', '22867', '22872', '22897', '22898', '22899', '22900', '22905', '22906', '22907', '22908', '22909', '22910', '22911', '22912', '22913', '22914', '22915', '22916', '22917', '22918', '22919', '22920', '22921', '22922', '22923', '22924', '22925', '22926', '22927', '22928', '22929', '22930', '22931', '22932', '22961', '22962', '22963', '22964', '22975', '22976', '22982', '22983', '22984', '22987', '22993', '26000', '26001', '26002', '26003', '26112', '26113', '26114', '26115', '26120', '26121', '26122', '26123', '26232', '26233', '26234', '26235', '26240', '26241', '26242', '26243', '26352', '26353', '26354', '26355', '26360', '26361', '26362', '26363', '26472', '26473', '26474', '26475', '26496', '26928', '26941', '26942', '26943', '26944', '26973', '26974', '26975', '26976', '27283', '27285', '27502', '27503', '27622', '27623', '27742', '27743', '27862', '27863',
      '22495', '22499', '23500', '23501', '23502', '23503', '23506', '23511', '23516', '23521', '23536', '23537', '23538', '23539', '23542', '23543', '23544', '23545', '23546', '23547', '23548', '23549', '23550', '23551', '23552', '23553', '23554', '23555', '23556', '23557', '23558', '23559', '23560', '23561', '23562', '23563', '23564', '23565', '23566', '23567', '23568', '23569', '23584', '23585', '23586', '23587', '23590', '23595', '23600', '23605', '23620', '23621', '23622', '23623', '23626', '23627', '23628', '23629', '23630', '23631', '23632', '23633', '23634', '23635', '23636', '23637', '23638', '23639', '23640', '23641', '23642', '23643', /*'23644',*/ '23645', '23646', '23647', '23648', '23649', '23650', '23651', '23652', '23653', '23668', '23669', '23670', '23671', '23674', '23675', '23676', '23677', '23680', '23685', '23690', '23695', '23710', '23711', '23712', '23713', '23716', '23717', '23718', '23719', '23720', '23721', '23722', '23723', '23724', '23725', '23726', '23727', '23728', '23729', '23730', '23731', '23732', '23733', '23734', '23735', '23736', '23737', '23738', '23739', '23740', '23741', '23742', '23743', '23758', '23759', '23760', '23761', '23764', '23765', '23766', '23767', '23770', '23775', '23780', '23785', '23800', '23801', '23802', '23803', '23806', '23807', '23808', '23809', '23810', '23811', '23812', '23813', '23814', '23815', '23816', '23817', '23818', '23819', '23820', '23821', '23822', '23823', '23824', '23825', '23826', '23827', '23828', '23829', '23830', '23831', '23832', '23833', '23848', '23849', '23850', '23851', '23856', '23859', '23943', '23944', '23945', '23946', '23950', '23951', '23952', '23953', '23957', '23958', '23964', '23965', '23966', '23967', '23971', '23972', '23973', '23974', '23978', '23979', '23980', '23981', '26500', '26501', '26502', '26503', '26598', '26599', '26600', '26601', '26605', '26606', '26607', '26608', '26703', '26704', '26705', '26706', '26710', '26711', '26712', '26713', '26808', '26809', '26810', '26811', '26815', '26816', '26817', '26818', '26921', '26926', '26969', '26970', '26971', '26972', '26977', '26978', '26979', '26980', '27284', '27286', '28500', '28501', '28502', '28503', '28605', '28606', '28607', '28608', '28710', '28711', '28712', '28713', '28816', '28817', '28818', '65534',
    ],
    lhA: [
      '00000', 
      '22497', '23001', '23002', '23012', '23014', '23015', '23016', '23017', '23018', '23019', '23020', '23028', '23031', '23046', '23049', '23050', '23051', '23052', '23053', '23054', '23055', '23070', '23073', '23088', '23091', '23092', '23093', '23094', '23095', '23096', '23097', '23112', '23117', '23120', '23135', '23138', '23139', '23140', '23141', '23142', '23143', '23144', '23159', '23164', '23174', '23176', '23218', '23223', '23270', '23312', '23317', '23359', '25093', '26923', '26965', '26966', '26967', '26968', '28000', '28047', '28094', '28141',
    ],
    //rhlhA: [],
    dfS: [
      '00010', '00156', '00157', '00186', '00187', '00188', '00189',
    ],
    doS: [
      '20002', '20013', '20313', '20314', '20026', '20027', '20028', '20029', '20040', // 破布
      '20074', '20077', '20101', '20102', '20103', '20104', '20115', '51040',  // 头盔1
      '20149', '20152', '20176', '20177', '20178', '20179', '20190', '20199', '20200', '51014', // 头盔2
      '20230', '20233', '20257', '20258', '20259', '20260', '20271', '20280', '20281', // 角盔1
      '20380', '20449', '20450', '20483', '24075', '24076', '24043', '24247', '24248', '24373', '24374', '20417', // 角盔2
      '24147', '24409', '24410', '24469', '24470', '24471', '25098',
      '24115', '24126', '24127', '24128', '24132', '24135', '24144', '20332', '24145', '24106', // 时装  
      '24938', '24939', '24940', '24941', '24942', '24991', '24999', '25073', '25074', '25075', // 万圣节、圣诞节
      '24111', '25353', '24456', '25434', '24438', '25858', /* '25368',*/ // 动物时装  
      '25357', '25358', '25359', '25360', '25361', '25462', // 龙头
      '24413', '24426', '24427', '24428', '24429', '25445', // 龙头无图标
    ],
    amS: [
      '20508', '20513', '20502', '20813', '20814', '20526', '20527', '20528', '20529', '20540', // 破布
      '20574', '20577', '20615', '20601', '20602', '20603', '20604', '22446', '20367', '51041', // 领结
      '20649', '20652', '20676', '20677', '20678', '20679', '20690', '20726', '20727', '51015', // 铠甲1
      '20730', '20733', '20757', '20758', '20759', '20760', '20771', '20807', '20808', // 铠甲2
      '20886', '20982', '20983', '20923', '20989', '24608', '24609',
      '24774', '24775', '24900', '24901', '24549', '23265',
      '20840', '24630', '24615', '24637', '24619', '25352', '24638', '24648', '24649', // 时装
      '24918', '25437', '24439', '25857', // 动物时装 
      '24902', '24911', '24912', '24913', '24914', '25442', // 套装
    ],
    dcS: [
      '21020', '21002', '20368', '21031', '21044', '21045', '21046', '21047', '22447', '51038', // 破布
      '21077', '21095', '21106', '21119', '21120', '21121', '21122', '21127', '21128', '51016', // 铠甲
      '21176', '21158', '21187', '21200', '21201', '21202', '21203', '21208', '21209', // 仿足
      '21274', '21355', '21356', 
      '21386', '21481', '21482', 
      '25015', '25025',  
      '21446', '25197', '25198', '25323', '25324',
      '21320', '21895',
      '21249', '25018', '25354', '25034', '25035', '25036', '25475', '25476', '27280', // 时装
      '25063', '25440', '24440', // 动物时装 
      '25049', '25058', '25059', '25060', '25061', '25446', // 套装
    ],
    lpS: [
      '21520', '21502', '21531', '21544', '21545', '21546', '21547', '20369', '51039', '22448', 
      '21577', '21595', '21606', '21619', '21620', '21621', '21622', '21627', '21628', '51017', 
      '21658', '21676', '21687', '21700', '21701', '21702', '21703', '21708', '21709', 
      '21784', '21865', '21866', '21896', '21991', '21992', 
      '21956', '25697', '25698', '25823', '25824',
      '25481', '25525', '25537', '25541', '25545', '25546', '21830', 
      '21755', '25355', '25533', '27281', // 时装
      '25565', '24441', // 动物时装 
      '25551', '25560', '25561', '25562', '25563', '25443', // 套装
    ],
    ppS: [
      '22002', '22025', '22011', '22012', '22013', '22014', 
      '22074', '22077', '22053', '22054', '22055', '22056', '22067', '22109', '22110', 
      '22155', '22158', '22134', '22135', '22136', '22137', '22148', '22190', '22191', 
      '22249', '22318', '22319', '22352', '22444', '22445', 
      '22412', '27124', '27125', '27250', '27251', '22286', 
      '22192', '25356', '22452', '22451', '22457', '22470', '22471', '22472', '24986', '25389', // 时装
      '24992', '25076', '25077', '25078', '25079', // 圣诞
      '27254', '25867', '24442', '25861', // 动物时装
      '22478', '22487', '22488', '22489', '22490', '25444', // 套装
    ],
    rhS: [
      '22492', '22508', '22509', '22540', '22545', '22556', '22557', '22600', '22601', '22602', '22603', '22604', '22605', '22606', '22613', '22614', '22645', '22650', '22661', '22662', '22705', '22706', '22707', '22708', '22709', '22710', '22711', '22712', '22713', '22714', '22715', '22716', '22717', '22718', '22725', '22726', '22733', '22734', '22765', '22770', '22781', '22782', '22825', '22826', '22827', '22828', '22829', '22830', '22831', '22832', '22833', '22834', '22835', '22836', '22837', '22838', '22847', '22848', '22855', '22856', '22887', '22892', '22903', '22904', '22947', '22948', '22949', '22950', '22951', '22952', '22953', '22954', '22955', '22956', '22957', '22958', '22959', '22960', '22969', '22970', '22971', '22972', '22973', '22974', '22978', '22988', '26006', '26007', '26118', '26119', '26126', '26127', '26238', '26239', '26246', '26247', '26358', '26359', '26366', '26367', '26478', '26479', '26927', '26937', '26938', '26939', '26940', '27507', '27627', '27747', '27867',
      '22491', '23505', '23531', '23541', '23577', '23578', '23579', '23580', '23581', '23582', '23583', '23589', '23615', '23625', '23661', '23662', '23663', '23664', '23665', '23666', '23667', '23673', '23679', '23705', '23715', '23751', '23752', '23753', '23754', '23755', '23756', '23757', '23763', '23769', '23795', '23805', '23841', '23842', '23843', '23844', '23845', '23846', '23847', '23853', '23857', '23861', '23862', '23930', '23931', '23948', '23955', '23960', '23962', '23969', '23976', '23983', '26505', '26603', '26610', '26708', '26715', '26813', '26820', '26914', '26920', '26933', '26934', '26935', '26936', '27292', '28505', '28610', '28715', '28820',
      ],
    lhS: [
      '23029', '23036', '23047', '23056', '23057', '23058', '23059', '23060', '23061', '23062', '23071', '23078', '23089', '23098', '23099', '23100', '23101', '23102', '23103', '23104', '23113', '23114', '23118', '23125', '23136', '23145', '23146', '23147', '23148', '23149', '23150', '23151', '23160', '23161', '23172', '23173', '23177', '23224', '23271', '23313', '23314', '23318', '23360', '23361', '25094', '25095', '26922', '26929', '26930', '26931', '26932',
    ],
    //rhlhS: [],
    dfT: [
      '00009', '00155', '00158', '00190', '00191', '00192', '00193', 
      '|', '24915', '01765', '02573',
    ],
    doT: [
      '20008', '20001', '20022', '20023', '20024', '20025', '20035', '20311', '20312', // 头环
      '20073', '20076', '20097', '20098', '20099', '20100', '20110', '51048', // 半盔
      '20148', '20151', '20172', '20173', '20174', '20175', '20185', '20197', '20198', '51022', // 星
      '20229', '20232', /*'20239',*/ '20253', '20254', '20255', '20256', '20266', '20278', '20279', // 尖耳
      '24042', '24245', '24246', '24371', '24372', 
      '24112', '24139', '24140', '24141', '24142', 
      '24457', '24472', '24473', '24474', '24475', 
      '24466', '24467', '24468', '20482', 
      '20389', '20416', '24104', '24108', '24109', '25432', '24114', '25085', '25468', // 时装
      '24073', '24074',  '24129', '24130', '24131',  '24406', '24407', '24408', // 时装
      '24933', '24934', '24935', '24936', '24937', '24998', '25080', '25081',  // 万圣节、圣诞节
      '25397', '25398', '25399', '25400', '25401', '25464', 
      '24446', '25864', '24411', '24418', '24419', '24420', '24421', '25454', // 套装
    ],
    amT: [
      '20501', '20811', '20812', '20522', '20523', '20524', '20525', '20535', 
      '20573', '20576', '20597', '20598', '20599', '20600', '20610', '20361', '20364', '51049', 
      '20648', '20651', '20672', '20673', '20674', '20675', '20685', '20724', '20725', '51023', 
      '20729', '20732', '20753', '20754', '20755', '20756', '20766', '20805', '20806', 
      '24645', '24646', '24647', 
      '24548', '24772', '24773', '24898', '24899', 
      '24917', '24923', '24924', '24925', '24926', '25467', 
      '20988', '24606', '24607', 
      '20895', '20922', '24613', '24622',
      '24616', '24620', '24627', '25087', '25435', // 时装
      '24447', '25862', '20832', '24903', '24904', '24905', '24906', '25452', // 套装
    ],
    dcT: [
      '21001', '21019', '21026', '21040', '21041', '21042', '21043', '20362', '20365', '51046',
      '21076', '21094', '21101', '21115', '21116', '21117', '21118', '21125', '21126', '51024',
      '21157', '21175', '21182', '21196', '21197', '21198', '21199', '21206', '21207', 
      '21385', '21479', '21480', 
      '21445', '25195', '25196', '25321', '25322', 
      '25064', '25069', '25070', '25071', '25072', '25465', 
      '21283', '21319', '25016', '25013', '25017', '25022', '25023', '25483', '25086', '25473', '25474', /*'24448',*/ // 时装
      '25031', '25032', '25033', // 时装
      '25047', '25050', '25051', '25052', '25053', '25455', // 套装
    ],
    lpT: [
      '21501', '21519', '21526', '21540', '21541', '21542', '21543', '20363', '20366', '51047', 
      '21594', '21576', '21601', '21615', '21616', '21617', '21618', '21625', '21626', '51025', 
      '21675', '21657', '21682', '21696', '21697', '21698', '21699', '21706', '21707', 
      '21955', '25695', '25696', '25821', '25822', 
      '25466', '25566', '25571', '25572', '25573', '25574', 
      '21805', '21829', '25084', '25479', '25484', '25523', '25526', '25527', '25535', '25536', // 时装
      '21989', '21990', '25542', '25543', '25544', // 时装
      '24449', '25456', '25549', '25552', '25553', '25554', '25555', // 套装

      '25441', 
    ],
    ppT: [
      '22001', '22007', '22008', '22009', '22010', '22020', '22154', '22157', 
      '22073', '22049', '22050', '22051', '22052', '22062', '22076', '22107', '22108', 
      '22130', '22131', '22132', '22133', '22143', '22188', '22189', 
      '22351', '22442', '22443', 
      '22411', '27122', '27123', '27248', '27249', 
      '25469', '27253', '27276', '27277', '27278', '27279',
      '22231', '22285', '22453', '24985', '25082', '25485', '25083', // 时装
      '22449', '22454', '22455', // 时装
      '22476', '22479', '22480', '22481', '22482', '25453', // 套装
    ],
    rhT: [
      '22506', '22507', '22530', '22535', '22554', '22555', '22586', '22587', '22588', '22589', '22590', '22591', '22592', '22593', '22594', '22595', '22596', '22597', '22598', '22599', '22611', '22612', '22635', '22640', '22659', '22660', '22691', '22692', '22693', '22694', '22695', '22696', '22697', '22698', '22699', '22700', '22701', '22702', '22703', '22704', '22723', '22724', '22731', '22732', '22755', '22760', '22779', '22780', '22811', '22812', '22813', '22814', '22815', '22816', '22817', '22818', '22819', '22820', '22821', '22822', '22823', '22824', '22845', '22846', '22853', '22854', '22877', '22882', '22901', '22902', '22933', '22934', '22935', '22936', '22937', '22938', '22939', '22940', '22941', '22942', '22943', '22944', '22945', '22946', '22967', '22968', '22977', '22979', '22985', '22986', '22994', '23451', '23453', '26004', '26005', '26116', '26117', '26124', '26236', '26237', '26244', '26356', '26357', '26364', '26476', '26477', '26497', '26925', '26949', '26950', '26951', '26952', '26961', '26962', '26963', '26964', '27266', '27290', '27504', '27744', '27864',
      '23504', '23526', '23540', '23570', '23571', '23572', '23573', '23574', '23575', '23576', '23588', '23610', '23624', '23654', '23655', '23656', '23657', '23658', '23659', '23660', '23672', '23678', '23700', '23714', '23744', '23745', '23746', '23747', '23748', '23749', '23750', '23762', '23768', '23790', '23804', '23834', '23835', '23836', '23837', '23838', '23839', '23840', '23852', '23854', '23855', '23860', '23868', '23869', '23874', '23875', '23876', '23877', '23878', '23879', '23880', '23881', '23882', '23883', '23888', '23889', '23890', '23891', '23892', '23893', '23894', '23895', '23896', '23897', '23898', '23903', '23904', '23905', '23906', '23907', '23908', '23909', '23910', '23911', '23912', '23913', '23918', '23919', '23920', '23921', '23922', '23923', '23924', '23925', '23926', '23947', '23949', '23954', '23956', '23959', '23961', '23963', '23968', '23970', '23975', '23977', '23982', '23984', '26499', '26504', '26506', '26602', '26604', '26609', '26611', '26707', '26709', '26714', '26716', '26812', '26814', '26819', '26821', '26913', '26915', '26924', '26945', '26946', '26947', '26948', '26957', '26958', '26959', '26960', '27287', '27288', '28506', '28527', '28609', '28611', '28714', '28716', '28819', '28821',
    ],
    lhT: [
      '23000', '23007', '23013', '23021', '23022', '23023', '23024', '23025', '23026', '23027', '23030', '23041', '23048', '23063', '23064', '23065', '23066', '23067', '23068', '23069', '23072', '23083', '23090', '23105', '23106', '23107', '23108', '23109', '23110', '23111', '23115', '23116', '23119', '23130', '23137', '23152', '23153', '23154', '23155', '23156', '23157', '23158', '23162', '23163', '23175', '23178', '23225', '23272', '23315', '23316', '23319', '23362', '23363', '25096', '25097', '26498', '26953', '26954', '26955', '26956', '27291',
    ],
    //rhlhT: [],
    vehicle: [],
  },
  /** 部件定义 */
  part: {
    // pilot
    body: { type: 'p', root: 'none', link: 'center', res: 'bd', regex: /.*_body$/ },
    arm: { type: 'p', root: 'body', link: 'arm', res: 'bd', regex: /.*_arm$/ },
    leg: { type: 'p', root: 'body', link: 'leg', res: 'bd', regex: /.*_leg$/ },
    weapon: { type: 'p', root: 'body', link: 'wp', res: 'wp' },
    clothes: { type: 'p', root: 'body', link: 'neck', res: 'cl', regex: /.*_body$/ },
    sleeve: { type: 'p', root: 'clothes', link: 'psleeve', res: 'cl', regex: /.*_arm$/ },
    pants: { type: 'p', root: 'clothes', link: 'pleg', res: 'cl', regex: /.*_leg$/ },
    wing: { type: 'p', root: 'body', link: 'neck', res: 'cl', regex: /.*_wing$/ },
    head: { type: 'p', root: 'body', link: 'neck', res: 'hd', regex: /head.*/ },
    horn: { type: 'p', root: 'head', link: 'brow', res: 'hd', regex: /horn.*_0$/ },
    horn1: { type: 'p', root: 'head', link: 'brow', res: 'hd', regex: /horn.*_1$/ },
    ear: { type: 'p', root: 'head', link: 'brow', res: 'hd', regex: /ear.*_0$/ },
    ear1: { type: 'p', root: 'head', link: 'brow', res: 'hd', regex: /ear.*_1$/ },
    face: { type: 'p', root: 'head', link: 'brow', res: 'fc', regex: /.*/ },
    facial: { type: 'p', root: 'head', link: 'brow', res: 'fa', regex: /^((?!.*(_01)).)*$/ },
    facial1: { type: 'p', root: 'head', link: 'brow', res: 'fa', regex: /.*_01$/ },
    hair: { type: 'p', root: 'head', link: 'brow', res: 'hr', regex: /hair(?!Lower).*/ },
    hair1: { type: 'p', root: 'head', link: 'brow', res: 'hr', regex: /hairLower.*/ },
    cap: { type: 'p', root: 'head', link: 'brow', res: 'cp' },
    emotion: { type: 'p', root: 'head', link: 'brow', res: 'emo', regex: /.*/ },
    // andras
    'a-body': { type: 'a', root: 'none', link: 'center', res: 'dfA', regex: /^body_.*/ }, // mount ahead propulsion
    'a-arml': { type: 'a', root: 'a-body', link: 'arml', res: 'dfA', regex: /^arml_.*/ }, // arml, hl
    'a-armr': { type: 'a', root: 'a-body', link: 'armr', res: 'dfA', regex: /^armr_.*/ }, // armr, hr
    'a-arms': { type: 'a', root: 'a-body', link: 'arms', res: 'dfA', regex: /^arms.*/ }, // arms
    'a-legl': { type: 'a', root: 'a-body', link: 'legl', res: 'dfA', regex: /^legl_.*/ }, // legl
    'a-legr': { type: 'a', root: 'a-body', link: 'legr', res: 'dfA', regex: /^legr_.*/ }, // legr
    'a-door': { type: 'a', root: 'a-body', link: 'ahead', res: 'doA', regex: /.*/ }, // ahead
    'a-door1': { type: 'a', root: 'a-body', link: 'ahead', res: 'doA', regex: /.*/ }, // ahead
    'a-armor': { type: 'a', root: 'a-body', link: 'ahead', res: 'amA', regex: /.*/ }, // ahead
    'a-skirt': { type: 'a', root: 'a-body', link: 'ahead', res: 'amA', regex: /.*/ }, // ahead
    'a-booster': { type: 'a', root: 'a-body', link: 'ahead', res: 'amA', regex: /.*/ }, // ahead
    'a-armr1': { type: 'a', root: 'a-body', link: 'armr', res: 'dcA', regex: /^armr_.*/ }, // armr, hr
    'a-arml1': { type: 'a', root: 'a-body', link: 'arml', res: 'dcA', regex: /^arml.*/ }, // arml, hl
    'a-legl1': { type: 'a', root: 'a-body', link: 'legl', res: 'lpA', regex: /.*legl.*/ }, // legl
    'a-legr1': { type: 'a', root: 'a-body', link: 'legr', res: 'lpA', regex: /.*legr.*/ }, // legr
    'a-propulsion': { type: 'a', root: 'a-body', link: 'propulsion', res: 'ppA', regex: /.*/ }, // propulsion
    'a-weapon': { type: 'a', root: 'a-body', link: 'rh', res: 'rhA', regex: /.*/ }, // rh gp
    'a-weapon1': { type: 'a', root: 'a-weapon', link: 'gp', res: 'rhA', regex: /.*_\d\d_00$/ }, // gp
    'a-shield': { type: 'a', root: 'a-body', link: 'lh', res: 'lhA', regex: /.*/ }, // lh
    // silva
    's-body': { type: 's', root: 'none', link: 'center', res: 'dfS', regex: /^body_.*/ }, // mount
    's-head': { type: 's', root: 's-body', link: 'gneck', res: 'dfS', regex: /^head.*/ }, // gneck, brow, mouth
    's-eye': { type: 's', root: 's-body', link: 'eye', res: 'dfS', regex: /^eye.*/ }, // eye
    's-fleg': { type: 's', root: 's-body', link: 'fleg', res: 'dfS', regex: /.*fleg.*/ }, // fleg
    's-bleg': { type: 's', root: 's-body', link: 'bleg', res: 'dfS', regex: /.*bleg.*/ }, // bleg
    's-tleg': { type: 's', root: 's-body', link: 'fleg', res: 'dfS', regex: /.*tleg.*/ }, // fleg
    's-cap': { type: 's', root: 's-body', link: 'gneck', res: 'doS', regex: /.*/ }, // gneck, fire
    's-armor': { type: 's', root: 's-body', link: 'navel', res: 'amS', regex: /.*/ }, // navel
    's-foot1': { type: 's', root: 's-body', link: 'fleg', res: 'dcS', regex: /^fl.*/ }, // fleg
    's-foot2': { type: 's', root: 's-body', link: 'bleg', res: 'dcS', regex: /^bl.*/ }, // bleg
    's-tail': { type: 's', root: 's-body', link: 'navel', res: 'lpS', regex: /.*/ }, // navel
    's-wing1': { type: 's', root: 's-body', link: 'wr', res: 'ppS', regex: /^w_.*/ }, // wr
    's-wing2': { type: 's', root: 's-body', link: 'wl', res: 'ppS', regex: /^wb_.*/ }, // wl
    's-weapon': { type: 's', root: 'body', link: 'prh', res: 'rhS', regex: /.*/ }, // up prh(pilot)
    's-book': { type: 's', root: 'body', link: 'plh', res: 'lhS', regex: /.*/ }, // mount plh(pilot)
    // talli
    't-body': { type: 't', root: 'none', link: 'center', res: 'dfT', regex: /.*_bd$/ },
    't-head': { type: 't', root: 't-body', link: 'tneck', res: 'dfT', regex: /^head.*/ }, // tneck, brow
    't-arml': { type: 't', root: 't-body', link: 'larm', res: 'dfT', regex: /^arml.*/ }, // larm, hl
    't-armr': { type: 't', root: 't-body', link: 'rarm', res: 'dfT', regex: /^armr.*/ }, // rarm, hr, fire
    't-leg': { type: 't', root: 't-body', link: 'tneck', res: 'dfT', regex: /^leg.*/ }, // tneck
    't-head1': { type: 't', root: 't-body', link: 'tneck', res: 'doT', regex: /.*/ }, // tneck
    't-body1': { type: 't', root: 't-body', link: 'tneck', res: 'amT', regex: /.*_bd$/ }, // tneck, tlarm, trarm
    't-arml1': { type: 't', root: 't-body1', link: 'tlarm', res: 'amT', regex: /^arml.*/ }, // tlarm
    't-armr1': { type: 't', root: 't-body1', link: 'trarm', res: 'amT', regex: /^armr.*/ }, // trarm
    't-legb': { type: 't', root: 't-body', link: 'tneck', res: 'amT', regex: /^leg.*/ }, // tneck
    't-arml2': { type: 't', root: 't-body', link: 'larm', res: 'dcT', regex: /^arml.*/ }, // larm
    't-armr2': { type: 't', root: 't-body', link: 'rarm', res: 'dcT', regex: /^armr.*/ }, // rarm
    't-legl': { type: 't', root: 't-body', link: 'tneck', res: 'lpT', regex: /.*_bdl$/ }, // tneck
    't-legr': { type: 't', root: 't-body', link: 'tneck', res: 'lpT', regex: /.*_bdr$/ }, // tneck
    't-cloak': { type: 't', root: 't-body', link: 'tneck', res: 'ppT', regex: /.*/ }, // tneck
    't-waeponrf': { type: 't', root: 't-body', link: 'rh', res: 'rhT', regex: /^rf_.*/ }, // rh
    't-waeponrb': { type: 't', root: 't-body', link: 'rh', res: 'rhT', regex: /^rb_.*/ }, // rh
    't-waeponlf': { type: 't', root: 't-body', link: 'lh', res: 'lhT', regex: /^lf_.*/ }, // lh
    't-waeponlb': { type: 't', root: 't-body', link: 'lh', res: 'lhT', regex: /^lb_.*/ }, // lh
    //other: { type: '', root: '', link: '', res: '', regex: /.*/ },
  },
  /** 部件动作帧名称摘录
   *  body: stand1_0_body stand1_1_body stand1_2_body stand2_0_body walk_0_body walk_1_body walk_2_body walk_3_body run_0_body run_1_body run_2_body run_3_body jump1_0_body jump1_1_body jump2_0_body jump2_1_body jump2_2_body jump2_3_body mount1_0_body mount2_0_body make_0_body make_1_body crawl_0_body crawl_1_body crawl_2_body die_0_body readyspell1_0_body readyspell1_1_body readyspell1_2_body readyspell1_3_body spellcast1_0_body spellcast1_1_body readyspell2_0_body readyspell2_1_body readyspell2_2_body readyspell2_3_body spellcast2_0_body spellcast2_1_body spellcast2_2_body spellcast2_3_body attack_0_body attack_1_body attack_2_body attack_3_body sit1_0_body sit2_0_body hit_0_body applaud_0_body applaud_1_body applaud_2_body laugh_0_body laugh_1_body beckon_0_body beckon_1_body love_0_body
   *  arm: stand1_0_arm stand1_1_arm stand1_2_arm stand2_0_arm walk_0_arm walk_1_arm walk_2_arm walk_3_arm run_0_arm run_1_arm run_2_arm run_3_arm jump1_0_arm jump1_1_arm jump2_0_arm jump2_1_arm jump2_2_arm jump2_3_arm mount1_0_arm mount2_0_arm make_0_arm make_1_arm crawl_0_arm crawl_1_arm crawl_2_arm die_0_arm readyspell1_0_arm readyspell1_1_arm readyspell1_2_arm readyspell1_3_arm spellcast1_0_arm spellcast1_1_arm readyspell2_0_arm readyspell2_1_arm readyspell2_2_arm readyspell2_3_arm spellcast2_0_arm spellcast2_1_arm spellcast2_2_arm spellcast2_3_arm attack_0_arm attack_1_arm attack_2_arm attack_3_arm sit1_0_arm sit2_0_arm hit_0_arm applaud_0_arm applaud_1_arm applaud_2_arm greet_0_arm greet_1_arm greet_2_arm greet_3_arm laugh_0_arm board_0_arm board_1_arm board_2_arm beckon_0_arm love_0_arm cry_0_arm shy_0_arm
   *  leg: jump2_3_leg mount2_0_leg sit1_0_leg sit2_0_leg
   *  head: head0 head1 head2 head3 head4 head_sleep01 head_sleep02 head_sleep03
   *  face: face_down face_left face_normal face_sleep face_half face_front face_surprise face_shock face_disappoint face_angry face_distort face_sulk face_laugh face_love00 face_love01 face_cry00 face_cry01 face_beckon00 face_beckon01 face_shy face_kiss face_smile
   *  facial: faCenter faLeft faRight faDown
   *  hair: hairLeft1_a hairCenter1_a hairRight1_a hairDown1_a hairLeft2_a hairCenter2_a hairRight2_a hairDown2_a hairBack1_a hairBack2_a hairTopLeft_a hairTopCenter_a hairTopRight_a hairTopDown_a hairTopBack1_a hairTopBack2_a hairBack1_s hairBack2_s hairTopLeft_s hairTopCenter_s hairTopRight_s hairTopDown_s hairTopBack1_s hairTopBack2_s hairLeft1_t hairCenter1_t hairRight1_t hairDown1_t hairLeft2_t hairCenter2_t hairRight2_t hairDown2_t hairBack1_t hairBack2_t hairTopLeft_t hairTopCenter_t hairTopRight_t hairTopDown_t hairTopBack1_t hairTopBack2_t
   *  hairLower: hairLower_stand hairLower_walk0 hairLower_walk1 hairLower_walk2 hairLower_walk3 hairLower_make hairLower_crawl hairLower_front hairLower_sit hairLower_down hairLowerTop_stand hairLowerTop_walk0 hairLowerTop_walk1 hairLowerTop_walk2 hairLowerTop_walk3 hairLowerTop_make hairLowerTop_crawl hairLowerTop_front hairLowerTop_sit hairLowerTop_down hairLower_run2 hairLowerTop_run2 hairLower_run3 hairLowerTop_run3
   *  cap: capLeft_as capCenter_as capRight_as capDown_as capBack_as capLeft_t capCenter_t capRight_t capDown_t capBack_t capLeftBack capCenterBack capDownBack capLeftBack_t
   *  weapon: wp00 wp01 wp02
   */
  /** 部件顺序 */
  order: [
    't-waeponrf', 't-armr2', 't-armr1', 't-armr', 't-waeponrb',
    't-legr', 't-legb', 't-legl', 't-leg',
    't-head1', 't-head', 't-body1', 't-body',
    't-waeponlf', 't-arml2', 't-arml1', 't-arml', 't-waeponlb',
    't-cloak',

    's-tail', 's-weapon', 's-wing1', 's-cap',
    's-eye', 's-head',
    's-foot1', 's-foot2', 's-armor', 
    's-fleg', 's-bleg',
    's-body', 's-tleg', 's-book', 's-wing2',

    'a-weapon', 'a-arms', 'a-armr1', 'a-armr',  'a-weapon1',
    'a-door',
    'a-skirt', 'a-legr1', 'a-legr',
    'a-armor', 'a-body',
    'a-door1', 
    'a-legl1', 'a-legl', 'a-booster',
    'a-arml1', 'a-arml', 'a-shield',
    'a-propulsion',

    'sleeve', 'arm', 'armWeapon', 'weapon',
    'cap', 'hair',
    'facial', 'emotion', 'ear', 'horn',
    'face', 'head',
    'facial1', 'ear1', 'horn1', 
    'pants', 'leg',
    'clothes', 'body', 
    'hair1', 'wing',
  ],
  /** frame对象格式参考 */
  FrameObjectTemplate: {
    // 基础信息
    name: '', imgName: '', imgURL: '',
    sizeX: 0, sizeY: 0,
    offsetX: 0, offsetY: 0,
    centerX: 0, centerY: 0,
    point: {
      'link-Node-Name': { name: '', x: 0, y: 0 }
    },
  },
  /** 将XML对象转换为json对象 */
  xml2json: (xml, payload = { domain: '', suffix: '.png' }) => {
    let json = {};
    // 填装frame节点
    let frameNode = xml.getElementsByTagName('frame');
    let frames = frameNode[0] ? frameNode[0].children : [];
    if (frames.length > 0) json.frame = {};
    for (let i = 0; i < frames.length; i++) {
      let f = frames[i];
      let item = json.frame[f.tagName] = {};
      item.name = f.tagName;
      let dds = f.getAttribute('name');
      item.imgName = dds.replace(/.*\\/, '').replace('.dds', '');
      item.imgURL = payload.domain + item.imgName + payload.suffix;
      item.sizeX = Number(f.getAttribute('sx'));
      item.sizeY = Number(f.getAttribute('sy'));
      item.offsetX = Number(f.getAttribute('x'));
      item.offsetY = Number(f.getAttribute('y'));
      item.centerX = Number(f.getAttribute('cx'));
      item.centerY = Number(f.getAttribute('cy'));
      // 载入连接点数据
      let pointNode = f.getElementsByTagName('point');
      let points = pointNode[0] ? pointNode[0].children : [];
      if (points.length > 0) item.point = {};
      for (let j = 0; j < points.length; j++) {
        let p = points[j];
        let itemp = item.point[p.getAttribute('name')] = {};
        itemp.name = p.getAttribute('name');
        itemp.x = Number(p.getAttribute('x'));
        itemp.y = Number(p.getAttribute('y'));
      }
    }
    // 填装action节点
    json.action = {};
    return json;
  },
}

/** 画布对象 */
class TenviCanvas {
  node = undefined;
  context = undefined; 
  bottom = 40; // 底部留空距离，单位px
  scale = { x: 1, y: 1 }; // 缩放系数
  isFlipX = false; // 是否水平翻转（未实现）
  isFlipY = false; // 是否垂直翻转（未实现）
  hasAxis = true; // 是否生成坐标轴线
  dataList = undefined; // 传入的绘制数据
  _getDataList = undefined; // 获取绘制数据的函数

  constructor(obj, getDataFunction) {
    if (typeof obj === 'string') this.node = document.getElementById(obj);
    else if (typeof obj === 'object') this.node = obj;
    else return;
    // 初始化
    if (getDataFunction) this._getDataList = getDataFunction;
    this.context = this.node.getContext('2d');
    this.context.imageSmoothingEnabled = false; // 关闭抗锯齿
  }

  /** 原点坐标 */
  get origin() {
    let x = this.size.x / 2;
    let y = this.size.y - this.bottom;
    return { x: x, y: y };
  }
  /** 画布尺寸 */
  get size() {
    let x = this.node.width;
    let y = this.node.height;
    return { x: x, y: y };
  }

  /** 设置画布尺寸 */
  setSize(w, h) {
    this.node.width = w;
    this.node.height = h;
  }
  /** 清空画布 */
  clean() {
    this.context.clearRect(0, 0, this.size.x, this.size.y);
    return this;
  }
  /** 绘制坐标轴线 */
  drawAxis() {
    this.context.lineWidth = 1;
    this.context.strokeStyle = '#999';
    // 绘制X轴
    let _oy = Math.floor(this.origin.y) + 0.5;
    this.context.moveTo(0, _oy);
    this.context.lineTo(this.size.x, _oy);
    this.context.stroke();
    // 绘制Y轴
    let _ox = Math.floor(this.origin.x) + 0.5;
    this.context.moveTo(_ox, 0);
    this.context.lineTo(_ox, this.size.y);
    this.context.stroke();
    return this;
  }
  /** 绘制单张图像 */
  drawImg(data) {
    if (!data || !data['img']) return;
    //console.log('drawImg', data);
    let s = this.scale;
    this.context.drawImage(
      data.img, // 图像资源
      data.offset.x, // 图像裁剪偏移x
      data.offset.y, // 图像裁剪偏移y
      data.size.x, // 图像宽度
      data.size.y, // 图像高度
      this.origin.x + data.point.x * s.x, // 绘制位置x
      this.origin.y - data.point.y * s.y, // 绘制位置y
      data.size.x * s.x, // 绘制的图像宽度
      data.size.y * s.y // 绘制的图像高度
    );
  }
  /** 绘制一组图像 */
  draw(...list) {
    //this.clean(); // 清空画布
    //if (this.hasAxis) this.drawAxis(); // 绘制坐标轴线
    // 保存绘制数据
    if (list) this.dataList = list;
    else if (this._getDataList) this.dataList = this._getDataList();
    // 处理翻转
    /*
    let fx = (this.isFlipX ? -1 : 1);
    let fy = (this.isFlipY ? -1 : 1);
    let tx = this.isFlipX ? -this.size.x : 0;
    let ty = this.isFlipY ? this.size.y : 0;
    this.context.scale(fx, fy);
    this.context.translate(tx, ty);
    */
    // 绘制部件
    for (let i = 0; i < this.dataList.length; i++) {
      this.drawImg(this.dataList[i]);
    }
    return this;
  }
  /** 获取当前画布生成图像的地址 */
  toImgUrl(type = 'image/png') {
    //console.log('toImgUrl', this.node.toDataURL(type));
    return this.node.toDataURL(type);
  }
  /** 绘制数据对象模板 */
  DrawDataTemplate = {
    name: '', url: '', img: undefined,
    size: {x: 0, y: 0},
    offset: {x: 0, y: 0},
    point: {x: 0, y: 0},
  }
}